package com.emergency.evaluate.domain;

import com.emergency.base.domain.BaseEntity;
import com.emergency.base.domain.Scenar;


import javax.persistence.*;

/**
 * Created by Administrator on 2020/5/14.
 * 提取指标后权重库复制权重
 */
@Entity
@Table(name = "eva_weight")
public class Weight extends BaseEntity {

    //对应的提取指标
    @OneToOne(targetEntity = Indicator.class,fetch = FetchType.LAZY)
    @JoinColumn(name = "indicator_id",referencedColumnName = "id")
    private Indicator indicator;

    @OneToOne(targetEntity = Scenar.class,fetch = FetchType.LAZY)
    @JoinColumn(name = "scenar_id",referencedColumnName = "id")
    private Scenar scenar;

    //指标权重
    private double weight;

    public Indicator getIndicator() {
        return indicator;
    }

    public void setIndicator(Indicator indicator) {
        this.indicator = indicator;
    }

    public Scenar getScenar() {
        return scenar;
    }

    public void setScenar(Scenar scenar) {
        this.scenar = scenar;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }
}
